package com.jrh.biz.hall;

import java.util.List;

import com.jrh.dal.HallDao;
import com.jrh.domain.entity.Hall;

/**
 * 展厅服务实现
 * 
 * @author yout 2012-7-24 下午7:16:04
 */
public class HallServiceImpl implements HallService {

    private HallDao hallDao;

    public void setHallDao(HallDao hallDao) {
        this.hallDao = hallDao;
    }

    @Override
    public void addHall(Hall hall) {
        hallDao.create(hall);

    }

    @Override
    public void deleteHall(long id) {
        hallDao.delete(id);
    }

    @Override
    public List<Hall> listHallByBrandId(long brandId) {
        Hall hall = new Hall();
        hall.setBrandId(brandId);
        return hallDao.listByCondition(hall);
    }

    @Override
    public Hall getHallById(long id) {
        return hallDao.load(id);
    }

    @Override
    public void updateHall(Hall hall) {
        hallDao.update(hall);
    }

}
